import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import './assets/main.css'
//  ElementPlus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
// ElementPlus icon
import * as ElementPlusIconsVue from '@element-plus/icons-vue'

// echart
import * as echarts from 'echarts';


// 全局注册组件
import Affix from "./views/Affix.vue";
import SearchBar from "@/components/SearchBar.vue";





const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
app.component('Affix', Affix)
app.component('SearchBar',SearchBar)
app.config.globalProperties.$echarts = echarts
app.use(ElementPlus)
app.use(createPinia())
app.use(router)
app.mount('#app')
